Description: This is an example of using QuickTimes FireWire video output component to play a DV stream (.dv movie) out to a DV Camera. This code is based on VidOutApp originally written by Jay Lloyd, Casey King and Adrienne Wang.
Version: 1.0
Date: January 28, 2000
Requirements: Mac OS 8.5+, QuickTime 4.0+, FireWire capable Macintosh, DV Camera, Universal Interfaces 3.3.1+ or QuickTime 4.1+ SDK.
IDE Requirements: This project was built with CodeWarrior Pro 5 (IDE 4.0.4) and Universal Interfaces 3.3.1b4.
Note: If you have the latest Universal Interfaces (3.3.1 or greater) you should not need to modify the project at all. However if you're using the QuickTime SDK containing newer QuickTime Interfaces, be sure to modify the projects access paths to include the QuickTime SDK before the Universal Interfaces.
Please direct questions and or comments to http://developer.apple.com/contact/feedback.html
The main component of this example is an easy to use class which encapsulates
the basic set of functions required to output a DV Stream over FireWire.
CVideoOutput class contains the following methods:
Open( const unsigned char inClientNameStr[], const short inMode )
Opens the FireWire video output component, registers a client name with the component and sets up the display mode. This method also acquires the audio media handlers for up to five audio tracks for use later when setting up the sound device and will automatically close a video output component if it's already open before re-instantiating a new one.
Close( void )
Closes the component instance and zeros the object. It is also called by the objects destructor.
Gains exclusive access to the hardware, sets up the sound output and the clock component associated with the video output component. Begin also acquires the GWorld used by the video output component. Both the sound and clock parameters are set to 'true' by default.
End( void )
Relinquishes exclusive access to the hardware. It is also called by Close().
SetEchoPort( const CGrafPtr inEchoPort = NULL )
Allows you to display video both on an external video display and in a window. Pass in a CGrafPtr to specify a window to display video sent to the device. When video is displayed in the window you specify, the video is displayed in the window and sent to the normal output of the video output device. SimpleVideoOut by default turns the EchoPort on but allows you to turn it off.
This call will turn on/off the use of the video output components sound device, by default SimpleVideoOut turns it on. Passing in 'true' will set up the use of the video output components sound device and also sets up the clock component which is used to synchronize video and sound for a movie to the rate of the display. Passing in 'false' will use the default sound device and default clock.
GetGWorld( void )
Returns a pointer to the graphics world used by a video output component.
GetError( void )
Returns the last return code generated by the system.